package au.com.handsunited.utils.comparator;

import java.util.Comparator;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import au.com.handsunited.model.notices.Notice;

/**
 * @author Arun Chandrasekhar
 *
 */
public class NoticesSorter implements Comparator<Notice> {

	private static Logger logger = LoggerFactory.getLogger(NoticesSorter.class);

	
	/**
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	@Override
	public int compare(Notice notice1, Notice notice2) {
		return notice2.getDateCreated().getDate().compareTo(notice1.getDateCreated().getDate());
	}

}
